<?php
declare(strict_types = 1);
namespace App\Model\PssModel;

use App\Model\BaseModel\BasePssModel;

class Sysconfig extends BasePssModel
{

    public $table = 'sysconfig';
    
    /**
     * 获取第三方业务对接配置info
     * @param string code
     * @return contents
     */
    public function getConfigByEventsValue(string $code)
    {
        $select = [
            'contents'
        ];
        $where = [
            'code'   => $code,
            'status' => 1
        ];
        $row = $this->info($where, $select);
        return  $row ?  @json_decode($row['contents'],true): '';
    }
}